Motion-activated switch control based on object detection

ABSTRACT

This disclosure provides methods, devices, and systems for controlling motion-activated switches. The present implementations more specifically relate to relay controller that prevent motion-activated switches from turning off devices associated with an environment in which people are present. In some aspects, a motion-activated switch may include a relay controller coupled to a motion sensor, a camera, and a relay. The motion sensor outputs a motion trigger to the relay controller responsive to detecting motion in an environment. The motion trigger may cause the relay controller to acquire one or more images of the environment, via the camera, and selectively toggle the relay based on the acquired images. For example, the relay controller may close the relay responsive to identifying an image that includes an object of interest or may open the relay controller may open the relay responsive to identifying an image that does not include an object of interest.

TECHNICAL FIELD

The present implementations relate generally to motion-activatedswitches, and specifically to controlling motion-activated switchesbased on object detection.

BACKGROUND OF RELATED ART

Motion-activated switches rely on motion triggers to toggle power tovarious devices (such as lights or other appliances). A motion-activatedswitch may include a relay and a motion sensor (such as a passiveinfrared (PIR) or microwave (MW) sensor). The motion sensor outputs anactivation signal responsive to detecting motion (such as a movingobject) in its field-of-view (FOV). The activation signal causes therelay to close, thereby coupling one or more devices to a power supply.As such, the motion-activated switch may “turn on” the devices coupledthereto. For example, a motion-activated light switch may turn on one ormore lights in a room responsive to detecting a person entering theroom.

Many motion-activated switches are controlled by timers, for example, toreduce power consumption. The timer initiates a countdown when themotion sensor of a motion-activated switch outputs an activation signal.If the motion sensor outputs a subsequent activation signal before thecountdown expires, the timer is reset, and the countdown is restarted.When the countdown expires, the motion-activated switch opens the relay,thereby decoupling the one or more devices from the power supply. Assuch, the motion-activated switch may “turn off” the devices coupledthereto. More specifically, the timer may prevent unnecessary powerconsumption by devices in an area where people are not present.

The motion sensors associated with motion-activated switches generallyhave limited range and sensitivity. As such, a motion-activated switchmay not be able to detect subtle movements (such as a person typing on acomputer) or movements of objects beyond a threshold range (such as aperson located on an opposite side of the room from the motion-activatedswitch). Motion-activated switches also may not be able to detectstationary objects (such as persons standing or sitting still). Thus, insome instances, a motion-activated switch that is controlled by a timermay turn off its associated devices even though people may still bepresent in the environment (although not detected by the motion sensor).Thus, new switch designs are needed to avoid turning off devices inareas where people are still present.

SUMMARY

This Summary is provided to introduce in a simplified form a selectionof concepts that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tolimit the scope of the claimed subject matter.

One innovative aspect of the subject matter of this disclosure can beimplemented in a method performed by a relay controller. The methodincludes steps of receiving a motion trigger indicating that motion isdetected in an environment; obtaining one or more images of theenvironment based on the motion trigger; performing an object detectionoperation that indicates whether the one or more images include anobject of interest; and selectively toggling a relay coupled to one ormore devices associated with the environment based at least in part onthe object detection operation.

Another innovative aspect of the subject matter of this disclosure canbe implemented in a relay controller that includes a processing systemand a memory. The memory stores instructions that, when executed by theprocessing system, cause the relay controller to receive a motiontrigger indicating that motion is detected in an environment; obtain oneor more images of the environment based on the motion trigger; performan object detection operation that indicates whether the one or moreimages include an object of interest; and selectively toggle a relaycoupled to one or more devices associated with the environment based atleast in part on the object detection operation.

Another innovative aspect of the subject matter of this disclosure canbe implemented in system including a relay coupled to one or moredevices associated with an environment, a motion sensor configured todetect motion in the environment, and a camera configured to captureimages of the environment. The system further includes a relaycontroller configured to receive, from the motion sensor, a motiontrigger indicating that motion is detected in the environment; obtain,via the camera, one or more images of the environment responsive toreceiving the motion trigger; performing an object detection operationthat indicates whether the one or more images include an object ofinterest; and selectively toggle the relay based at least in part on theobject detection operation.

BRIEF DESCRIPTION OF THE DRAWINGS

The present implementations are illustrated by way of example and arenot intended to be limited by the figures of the accompanying drawings.

FIG. 1 shows an example environment that can be monitored by amotion-activated switch.

FIG. 2 shows a block diagram of a motion-activated switch, according tosome implementations.

FIG. 3 shows an illustrative flowchart depicting an example operation ofa motion-activated switch, according to some implementations.

FIGS. 4A and 4B show example changes to an environment monitored by amotion-activated switch.

FIG. 5 shows a series of example images that can be captured by amotion-activated switch.

FIG. 6 shows another series of example images that can be captured by amotion-activated switch.

FIG. 7 shows a block diagram of a relay controller, according to someimplementations.

FIG. 8 shows an illustrative flowchart depicting an example operationfor controlling a motion-activated switch, according to someimplementations.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forthsuch as examples of specific components, circuits, and processes toprovide a thorough understanding of the present disclosure. The term“coupled” as used herein means connected directly to or connectedthrough one or more intervening components or circuits. The terms“electronic system” and “electronic device” may be used interchangeablyto refer to any system capable of electronically processing information.Also, in the following description and for purposes of explanation,specific nomenclature is set forth to provide a thorough understandingof the aspects of the disclosure. However, it will be apparent to oneskilled in the art that these specific details may not be required topractice the example embodiments. In other instances, well-knowncircuits and devices are shown in block diagram form to avoid obscuringthe present disclosure. Some portions of the detailed descriptions whichfollow are presented in terms of procedures, logic blocks, processingand other symbolic representations of operations on data bits within acomputer memory.

These descriptions and representations are the means used by thoseskilled in the data processing arts to most effectively convey thesubstance of their work to others skilled in the art. In the presentdisclosure, a procedure, logic block, process, or the like, is conceivedto be a self-consistent sequence of steps or instructions leading to adesired result. The steps are those requiring physical manipulations ofphysical quantities. Usually, although not necessarily, these quantitiestake the form of electrical or magnetic signals capable of being stored,transferred, combined, compared, and otherwise manipulated in a computersystem. It should be borne in mind, however, that all of these andsimilar terms are to be associated with the appropriate physicalquantities and are merely convenient labels applied to these quantities.

Unless specifically stated otherwise as apparent from the followingdiscussions, it is appreciated that throughout the present application,discussions utilizing the terms such as “accessing,” “receiving,”“sending,” “using,” “selecting,” “determining,” “normalizing,”“multiplying,” “averaging,” “monitoring,” “comparing,” “applying,”“updating,” “measuring,” “deriving” or the like, refer to the actionsand processes of a computer system, or similar electronic computingdevice, that manipulates and transforms data represented as physical(electronic) quantities within the computer system's registers andmemories into other data similarly represented as physical quantitieswithin the computer system memories or registers or other suchinformation storage, transmission or display devices.

In the figures, a single block may be described as performing a functionor functions; however, in actual practice, the function or functionsperformed by that block may be performed in a single component or acrossmultiple components, and/or may be performed using hardware, usingsoftware, or using a combination of hardware and software. To clearlyillustrate this interchangeability of hardware and software, variousillustrative components, blocks, modules, circuits, and steps have beendescribed below generally in terms of their functionality. Whether suchfunctionality is implemented as hardware or software depends upon theparticular application and design constraints imposed on the overallsystem. Skilled artisans may implement the described functionality invarying ways for each particular application, but such implementationdecisions should not be interpreted as causing a departure from thescope of the present disclosure. Also, the example input devices mayinclude components other than those shown, including well-knowncomponents such as a processor, memory and the like.

The techniques described herein may be implemented in hardware,software, firmware, or any combination thereof, unless specificallydescribed as being implemented in a specific manner. Any featuresdescribed as modules or components may also be implemented together inan integrated logic device or separately as discrete but interoperablelogic devices. If implemented in software, the techniques may berealized at least in part by a non-transitory processor-readable storagemedium including instructions that, when executed, performs one or moreof the methods described above. The non-transitory processor-readabledata storage medium may form part of a computer program product, whichmay include packaging materials.

The non-transitory processor-readable storage medium may comprise randomaccess memory (RAM) such as synchronous dynamic random-access memory(SDRAM), read only memory (ROM), non-volatile random access memory(NVRAM), electrically erasable programmable read-only memory (EEPROM),FLASH memory, other known storage media, and the like. The techniquesadditionally, or alternatively, may be realized at least in part by aprocessor-readable communication medium that carries or communicatescode in the form of instructions or data structures and that can beaccessed, read, and/or executed by a computer or other processor.

The various illustrative logical blocks, modules, circuits andinstructions described in connection with the embodiments disclosedherein may be executed by one or more processors (or a processingsystem). The term “processor,” as used herein may refer to anygeneral-purpose processor, special-purpose processor, conventionalprocessor, controller, microcontroller, and/or state machine capable ofexecuting scripts or instructions of one or more software programsstored in memory.

Various aspects relate generally to motion-activated switches, and moreparticularly, to relay controllers that prevent motion-activatedswitches from turning off devices associated with an environment inwhich people are present. In some aspects, a motion-activated switch mayinclude a relay controller coupled to a motion sensor, a camera, and arelay. The motion sensor outputs a motion trigger to the relaycontroller responsive to detecting motion in an environment. In someimplementations, the motion trigger may cause the relay controller toacquire one or more images of the environment, via the camera, andselectively toggle the relay based on the acquired images. Morespecifically, the relay controller may analyze the images for objects ofinterest. As used herein, the term “object of interest” refers to anyobject (such as a person) whose presence in the environment causes themotion-activated switch to turn on one or more devices coupled to therelay (such as lights or other appliances). For example, the relaycontroller may close the relay, thereby coupling the devices to a powersupply, responsive to identifying an image that includes an object ofinterest. On the other hand, the relay controller may open the relay,thereby decoupling the devices from the power supply, responsive toidentifying an image that does not include an object of interest.

Particular implementations of the subject matter described in thisdisclosure can be implemented to realize one or more of the followingpotential advantages. Aspects of the present disclosure may improve userexperience associated with motion-activated switches by selectivelytoggling a relay coupled to one or more devices based on images capturedof the surrounding environment. As described above, existingmotion-activated switches may fail to detect people that are relativelystationary or far away from their motion sensors. As a result, suchmotion-activated switches may turn off one or more devices associatedwith an environment even while people are still present in theenvironment. Aspects of the present disclosure recognize that imageanalysis can more accurately identify the presence of objects ofinterest in a given environment (such as through machine learning),particularly when the objects are stationary or relatively far from themotion-activated switch. Thus, by controlling the opening and closing ofthe relay based on captured images, the relay controller of the presentimplementations may reduce false triggers in motion-activated switchesand avoid turning off devices associated with an environment in whichpeople are present.

FIG. 1 shows an example environment 100 that can be monitored by amotion-activated switch 110. In the example of FIG. 1 , the environment100 is depicted as a room or office that includes overhead lighting 104.In some implementations, the motion-activated switch 110 may bepositioned by an entrance 102 to the environment (such as a doorway) andconfigured to control one or more devices or appliances associated withthe environment 100 (such as the overhead lighting 104) based on apresence or absence of objects of interest in the environment 100.

In some aspects, the motion-activated switch 110 may include an imagecapture component and a motion sensing component having a field-of-view(FOV) 112 that encompasses at least part of the environment 100. Morespecifically, the motion sensing component may generate a motion triggeror activation signal responsive to detecting movement in its FOV 112. Insome implementations, the motion-activated switch 110 may capture one ormore images of the environment 100, via the image capture component, inresponse to a motion trigger and may turn the overhead lighting 104 (orother devices associated with the environment 100) on or off based, atleast in part, on the captured images. More specifically, themotion-activated switch 110 may analyze the captured images to determinewhether an object of interest (such as a person) is present in theenvironment 100.

In some implementations, the motion-activated switch 110 may turn on theoverhead lighting 104 in response to determining that at least one ofthe captured images includes an object of interest. In contrast withexisting motion-activated switches, the motion-activated switch 110 doesnot directly activate the overhead lighting 104 in response to themotion trigger. Rather, the motion trigger causes the motion-activatedswitch 110 to capture images of the environment 100 and analyze thecaptured images for objects of interest. More specifically, themotion-activated switch 110 may turn on the overhead lighting 104 onlyif it captures one or more images showing that an object of interest iscurrently present in the environment 100.

In some implementations, the motion-activated switch 110 may turn offthe overhead lighting 104 in response to determining that at least oneof the captured images does not include an object of interest. Incontrast with existing motion-activated switches, the motion activatedswitch 110 does not rely on a timer or countdown to turn off theoverhead lighting 104. Instead, the motion-activated switch 110 analyzesthe captured images to determine whether any objects of interest arestill present in the environment 100. More specifically, themotion-activated switch 110 may turn off the overhead lighting 104 onlyif it captures one or more images showing that no objects of interestare currently present in the environment 100.

FIG. 2 shows a block diagram of a motion-activated switch 200, accordingto some implementations. In some implementations, the motion-activatedswitch 200 may be one example of the motion-activated switch 110 of FIG.1 . For example, the motion-activated switch 200 may be configured tocontrol one or more devices or appliances (such as lighting) associatedwith an environment based on a presence or absence of one or moreobjects of interest in the environment.

The motion-activated switch 200 includes a relay 210, a relay controller220, a motion sensor 230, and a camera 240. The motion sensor 230 mayutilize any suitable motion-sensing technology to detect motion in itsFOV. Example suitable motion sensors may include passive infrared (PIR)sensors, microwave (MW) sensors, area reflective sensors, or ultrasonicmotion sensors, among other examples. The camera 240 may utilize anysuitable image-capture technology to capture images of an environment.Example suitable cameras may include complementarymetal-oxide-semiconductor (CMOS) image sensor arrays, charge-coupleddevice (CCD) arrays, or any other sensors capable of detectingwavelengths of light in the visible spectrum, the infrared spectrum, orthe ultraviolet spectrum.

In some implementations, the relay 210 may include a first terminal 212coupled to the power supply and a second terminal 214 coupled to one ormore devices. With reference for example to FIG. 1 , the second terminal214 may be coupled to the overhead lighting 104 and the first terminal212 may be coupled to a power supply (not shown for simplicity). Therelay 210 can be toggled between a closed state and an open state toswitchably couple the power supply to the one or more devices. In theclosed state, the relay 210 forms a closed circuit between its terminals212 and 214, thereby turning “on” the devices coupled to the secondterminal 214. In the open state, the relay 210 forms an open circuitbetween its terminals 212 and 214, thereby turning “off” the devicescoupled to the second terminal 214.

In some aspects, the relay controller 220 may control or toggle therelay 210 based, at least in part, on information received from themotion sensor 230 and the camera 240. More specifically, the motionsensor 230 may output a motion trigger 202 in response to detectingmotion in a given environment. In some implementations, the motiontrigger 202 may wake up the relay controller 220 from a low power oridle mode. The relay controller 220 may activate the camera 240 tocapture one or more images 204 of the environment in response toreceiving the motion trigger 202. In some implementations, the relaycontroller 220 may include an object detection component 222 to analyzethe images 204 for objects of interest. More specifically, the objectdetection component 222 may perform an object detection operation thatindicates whether an object of interest is detected in each of theimages 204.

In some implementations, the object detection component 222 may includea neural processing unit (NPU) that can identify or infer objects ofinterest in the captured images 204 based on a neural network model. Forexample, the model can be “trained” by providing a neural network with alarge volume of input images that contain objects of interest (such asimages of people at various distances from a camera). The neural networkanalyzes the input images to “learn” a set of rules that can be used toidentify various objects of interest in captured images. For example,the neural network may perform statistical analysis on the input imagesto determine a common set of rules (representing the neural networkmodel) that can be associated with an object of interest.

In some implementations, the relay controller 220 may output a controlsignal 206 to the relay 210 based on the object detection operation.More specifically, the relay controller 220 may assert the controlsignal 206 if the object detection operation identifies an object ofinterest in at least one of the captured images 204 and may deassert thecontrol signal 206 if the object detection operation fails to identifyan object of interest in at least one of the captured images 204. Insome implementations, the relay controller 220 may enter (or re-enter) alow power mode after a threshold duration has elapsed. When entering thelow power mode, the relay controller 220 may stop acquiring images 204via the camera 240 and may hold or maintain the current (asserted ordeasserted) state of the control signal 206.

The control signal 206 may toggle the relay 210 between the open stateand the closed state. For example, the relay 210 may be closed (andremain closed) for as long as the control signal 206 is asserted. On theother hand, the relay 210 may be opened (and remain open) for as long asthe control signal 206 is deasserted. As such, the relay controller 220may open the relay 210 only if the object detection component 222actively identifies one or more images 204 that do not include anyobjects of interest. In other words, when the relay 210 is closed, therelay 210 remains closed until the relay controller 220 acquires animage 204 that does not include any objects of interest. Similarly, whenthe relay 210 is open, the relay 210 remains open until the relaycontroller 220 acquires an image 204 that includes an object ofinterest.

FIG. 3 shows an illustrative flowchart depicting an example operation300 of a motion-activated switch, according to some implementations. Insome implementations, the motion-activated switch may be one example ofthe motion-activated switch 200 of FIG. 2 .

The motion-activated switch initially operates in low power mode (310).For example, the camera 240 and one or more processors of the relaycontroller 220 may be inactive when the motion-activated switch 200operates in the low power mode. When the motion-activated switch detectsmotion in the surrounding environment (320), the motion-activated switchproceeds to capture an image of the environment (330). For example, themotion sensor 230 may output a motion trigger 202 responsive todetecting motion in its FOV. The motion trigger 202 may activate one ormore processors of the relay controller 220 which, in turn, activatesthe camera 240. Once activated, the camera 240 may begin capturingimages (or frames of video) of the environment.

The motion-activated switch further determines whether one or moreobjects of interest are present in the captured image (340). Forexample, the object detection component 222 may perform an objectdetection operation that indicates whether the image includes an objectof interest. If an object of interest is present in the captured image(at 340), the motion-activated switch may close its relay (350). Forexample, the relay controller 220 may assert the control signal 206,thereby causing the relay 210 to close or continue operating in a closedstate. If no object of interest is present in the captured image (at340), the motion-activated switch may open its relay (360). For example,the relay controller 220 may deassert the control signal, therebycausing the relay 210 to open or continue operating in an open state.

The motion-activated switch further determines whether a thresholdduration has elapsed (370). As long as the threshold duration has notelapsed (at 370), the motion-activated switch may continue capturingimages of the environment (330) and analyzing the images for objects ofinterest (340). Once the threshold duration has elapsed (at 370), themotion-activated switch may return to operating in the low power mode(310). As such, the motion-activated switch may stop capturing images ofthe environment or toggling the relay in response thereto. For example,the relay controller 220 may hold or maintain the last state of thecontrol signal 206 prior to entering the low power mode. Themotion-activated switch may remain in the low power mode (310) untilsubsequent motion is detected in the environment (320).

FIGS. 4A and 4B show example changes to an environment 400A and 400B,respectively, monitored by a motion-activated switch 410. Theenvironment of FIGS. 4A and 4B may be one example of the environment 100of FIG. 1 . Thus, the motion-activated switch 410 may be positioned byan entrance to the environment (such as a doorway) and configured tocontrol one or more devices or appliances associated with theenvironment based on a presence or absence of objects of interest in theenvironment.

In some implementations, the motion-activated switch 410 may be oneexample of the motion-activated switch 200 of FIG. 2 . Thus, themotion-activated switch 410 may include an image capture component (suchas the camera 240) and a motion sensing component (such as the motionsensor 230). The motion sensing component may generate a motion triggerin response to detecting movement in its FOV 412. In someimplementations, the motion-activated switch 410 may capture one or moreimages of the environment, via the image capture component, in responseto each motion trigger and may analyze the captured images for objectsof interest. For example, a processor of the motion-activated switch 410(such as the object detection component 222) may perform an objectdetection operation that indicates whether each of the captured imagesincludes an object of interest.

In some aspects, the motion-activated switch 410 may control an overheadlighting 404 (or other devices associated with the environment) based onwhether an object of interest is detected in the captured images. Morespecifically, the motion-activated switch 410 may turn on the overheadlighting 404 in response to determining that a captured image includesan object of interest and may turn off the overhead lighting 404 inresponse to determining that a captured image does not include anyobjects of interest (such as described with reference to FIGS. 2 and 3). For example, a processor of the motion-activated switch 200 (such asthe relay controller 220) may toggle a relay coupled between a powersupply and the overhead lighting 404 (such as the relay 210) byasserting or deasserting a control signal (such as the control signal206) based on a result of the object detection operation.

With reference for example to FIG. 4A, a person 402 (or other object ofinterest) enters the environment via the doorway. Because this movementoccurs within the FOV 412, the motion sensing component of themotion-activated switch 410 detects the movement of the person 402 andgenerates a motion trigger in response to detecting the movement. Insome implementations, the motion trigger may wake up themotion-activated switch 410 from a low power mode. The motion-activatedswitch 410 activates the image capture component to begin capturingimages of the environment in response to the motion trigger. In theexample of FIG. 4A, the motion-activated switch 410 may detect thepresence of the person 402 in at least one of the captured images. As aresult, the motion-activated switch 410 may turn on the overheadlighting 404 when the person 402 enters the environment.

With reference for example to FIG. 4B, the person 402 moves to the farend of the environment (opposite the entryway) and sits down at a tableor desk. For example, the person 402 may proceed to work or study at thetable. In some implementations, the image capture component of themotion-activated switch 410 may continue capturing images of theenvironment for at least a threshold duration after the motion sensingcomponent generates the motion trigger responsive to detecting themovement of the person 402 in its FOV 412 (such as described withreference to FIG. 4A). In the example of FIG. 4B, the captured imagesmay show the person 402 move to the far end of the room and sit down. Assuch, the motion-activated switch 410 may detect the person 402 in eachof the captured images and may thus refrain from turning off theoverhead lighting 404.

In some implementations, the motion-activated switch 410 may enter (orre-enter) a low power mode when the threshold duration elapses. Uponentering the low power mode, the motion-activated switch 410 may stopcapturing images of the environment and may hold or maintain the current(open or closed) state of its relay at the time the motion-activatedswitch 410. In the example of FIG. 4B, the motion-activated switch 410may enter the low power mode while the person 402 is seated at the farend of the environment. Further, the motion-activated switch 410 maydetermine that the person 402 is still present in the environment (basedon the presence of the person 402 in the captured images) when enteringthe low power mode. As such, the motion-activated switch 410 may holdthe relay in the closed position, thereby keeping the overhead lighting404 on, while operating the low power mode.

As shown in FIG. 4B, the person 402 is beyond the FOV 412 of the motionsensing component of the motion-activated switch 410 while sitting atthe table. As such, the motion sensing component may not be able todetect subsequent movements of the person 402. However, unlike existingmotion-activated switches, the motion-activated switch 410 does notrequire continuous motion triggers to keep the overhead lighting 404 on.Rather, once the motion-activated switch 410 turns on the overheadlighting 404, it may keep the overhead lighting 404 on until it capturesan image of the environment that does not include any objects ofinterest. Aspects of the present disclosure recognize that themotion-activated switch 410 may capture additional images when theperson 402 exits the environment, where at least one of the images mayshow that the person 402 is no longer present in the environment.

For example, when exiting the environment, the person 402 may re-enterthe FOV 412 of the motion sensing component of the motion-activatedswitch 410. The motion sensing component detects the movement of theperson 402 and generates a motion trigger in response to detecting themovement. In some implementations, the motion trigger may wake up themotion-activated switch 410 from a low power mode. The motion-activatedswitch 410 activates the image capture component to begin capturingimages of the environment in response to the motion trigger. Because theperson 402 is exiting the environment, the motion-activated switch 410may determine that the person 402 is absent from at least one of thecaptured images. As a result, the motion-activated switch 410 may turnoff the overhead lighting 404 when the person 402 exits the environment.

FIG. 5 shows a series of example images 500(1)-500(N) that can becaptured by a motion-activated switch. In some implementations, themotion-activated switch may be one example of the motion-activatedswitch 410 of FIGS. 4A and 4B. With reference for example to FIGS. 4Aand 4B, the series of images 500(1)-500(N) may be captured by themotion-activated switch 410 in response to detecting the person 402entering the environment. More specifically, the first image 500(1)shows the environment when the person 402 first enters the FOV 412 ofthe motion sensing component (such as in FIG. 4A) and the N^(th) image500(N) shows the environment when the person 402 sits down at the table(such as in FIG. 4B).

In the example of FIG. 5 , the motion-activated switch may detect thepresence of the person 402 in each of the captured images 500(1)-500(N).In some implementations, the motion-activated switch may turn on one ormore devices coupled to its relay (such as by closing the relay) inresponse to detecting the presence of the person 402 in the first image500(1) and may refrain from turning off the devices (such as bymaintaining the relay in the closed state) in response to detecting thepresence of the person 402 in each of the remaining images500(2)-500(N). In some implementations, the motion-activated switch mayoperate in a low power mode after capturing the series of images500(1)-500(N). Because the person 402 is present in the N^(th) image500(N), the motion-activated switch may keep the devices coupled to itsrelay on even after entering the low power mode.

FIG. 6 shows another series of example images 600(1)-600(N) that can becaptured by a motion-activated switch. In some implementations, themotion-activated switch may be one example of the motion-activatedswitch 410 of FIGS. 4A and 4B. With reference for example to FIGS. 4Aand 4B, the series of images 600(1)-600(N) may be captured by themotion-activated switch 410 in response to detecting the person 402exiting the environment. More specifically, the first image 600(1) showsthe environment when the person 402 re-enters the FOV 412 of the motionsensing component and the N^(th) image 600(N) shows the environmentafter the person 402 has left the environment.

In the example of FIG. 6 , the motion-activated switch may detect thepresence of the person 402 only in a subset of the captured images600(1)-600(N). In some implementations, the motion-activated switch mayrefrain from turning off one or more devices coupled to its relay (suchas by maintaining the relay in the closed state) in response todetecting the presence of the person 402 in the first image 600(1) andmay turn off the devices (such as by opening the relay) in response todetermining that no people are present in one or more of the remainingimages 600(2)-600(N). In some implementations, the motion-activatedswitch may operate in a low power mode after capturing the series ofimages 600(1)-600(N). Because no people are present in the N^(th) image600(N), the motion-activated switch may keep the devices coupled to itsrelay off even after entering the low power mode.

FIG. 7 shows a block diagram of a relay controller 700 for amotion-activated switch, according to some implementations. In someimplementations, the motion-activated switch may be one example of anyof the motion-activated switches 110, 200, or 410 of FIGS. 1, 2, and 4 ,respectively. With reference for example to FIG. 2 , the relaycontroller 700 may be one example of the relay controller 220. Thus, therelay controller 700 may be configured to selectively toggle a relayassociated with the motion-activated switch based on a presence orabsence of objects of interest in a given environment.

In some implementations, the relay controller 700 may include a deviceinterface 710, a processing system 720, and a memory 730. The deviceinterface 710 is configured to communicate with one or more componentsof the motion-activated switch. In some implementations, the deviceinterface 710 may include a motion sensor interface (I/F) 712, a camerainterface 714, and a relay interface 716. The motion sensor interface712 may receive motion triggers output by a motion sensor of themotion-activated switch (such as the motion sensor 230). The camerainterface 714 may output camera activation signals to, and receivecaptured images from, a camera of the motion-activated switch (such asthe camera 240). The relay interface 716 may output control signals to arelay (such as the relay 210).

The memory 730 may include a non-transitory computer-readable medium(including one or more nonvolatile memory elements, such as EPROM,EEPROM, Flash memory, a hard drive, and the like) that may store atleast the following software (SW) modules:

-   -   a motion detection SW module 732 to receive a motion trigger        indicating that motion is detected in an environment;    -   an image capture SW module 734 to obtain one or more images of        the environment based on the motion trigger;    -   an object detection SW module 736 to perform an object detection        operation that indicates whether the one or more images include        an object of interest; and    -   a relay control SW module 738 to selectively toggle a relay        coupled to one or more devices associated with the environment        based at least in part on the object detection operation.        Each software module includes instructions that, when executed        by the processing system 720, causes the relay controller 700 to        perform the corresponding functions.

The processing system 720 may include any suitable one or moreprocessors capable of executing scripts or instructions of one or moresoftware programs stored in the relay controller 700 (such as in memory730). For example, the processing system 720 may execute the motiondetection SW module 732 to receive a motion trigger indicating thatmotion is detected in an environment. The processing system 720 also mayexecute the image capture SW module 734 to obtain one or more images ofthe environment responsive to the motion trigger. Further, theprocessing system 720 may execute the object detection SW module 736 toperform an object detection operation that indicates whether the one ormore images include an object of interest. Still further, the processingsystem 720 may execute the relay control SW module 738 to selectivelytoggle a relay coupled to one or more devices associated with theenvironment based at least in part on the object detection operation.

FIG. 8 shows an illustrative flowchart depicting an example operation800 for controlling a motion-activated switch, according to someimplementations. In some implementations, the example operation 800 maybe performed by a relay controller for the motion-activated switch (suchas any of the relay controllers 220 or 700 of FIGS. 2 and 7 ,respectively).

The relay controller may receive a first motion trigger indicating thatmotion is detected in an environment (810). The relay controller mayobtain one or more first images of the environment based on the firstmotion trigger (820). The relay controller may further perform a firstobject detection operation that indicates whether the one or more firstimages include an object of interest (830). The relay controller mayfurther selectively toggle a relay coupled to one or more devicesassociated with the environment based at least in part on the firstobject detection operation (840). In some implementations, the one ormore devices may include one or more lighting elements configured toilluminate the environment.

In some implementations, the relay controller may selectively toggle therelay by closing the relay responsive to the first object detectionoperation indicating that at least one of the one or more first imagesincludes an object of interest. In such implementations, the closing ofthe relay may couple the one or more devices to a power supply. In someother implementations, the relay controller may selectively toggle therelay by opening the relay responsive to the first object detectionoperation indicating that at least one of the one or more first imagesdoes not include an object of interest. In such implementations, theopening of the relay may decouple the one or more devices from a powersupply.

In some aspects, the relay controller may further operate in a low powermode after a threshold duration following the reception of the firstmotion trigger. In some implementations, the one or more first imagesmay span the threshold duration. In some implementations, the relaycontroller may further receive a second motion trigger indicating thatmotion is detected in the environment; wake up from the low power moderesponsive to receiving the second motion trigger; obtain one or moresecond images of the environment responsive to waking from the low powermode; perform a second object detection operation that indicates whetherthe one or more second images include an object of interest; andselectively toggle the relay based at least in part on the second objectdetection operation.

Those of skill in the art will appreciate that information and signalsmay be represented using any of a variety of different technologies andtechniques. For example, data, instructions, commands, information,signals, bits, symbols, and chips that may be referenced throughout theabove description may be represented by voltages, currents,electromagnetic waves, magnetic fields or particles, optical fields orparticles, or any combination thereof.

Further, those of skill in the art will appreciate that the variousillustrative logical blocks, modules, circuits, and algorithm stepsdescribed in connection with the aspects disclosed herein may beimplemented as electronic hardware, computer software, or combinationsof both. To clearly illustrate this interchangeability of hardware andsoftware, various illustrative components, blocks, modules, circuits,and steps have been described above generally in terms of theirfunctionality. Whether such functionality is implemented as hardware orsoftware depends upon the particular application and design constraintsimposed on the overall system. Skilled artisans may implement thedescribed functionality in varying ways for each particular application,but such implementation decisions should not be interpreted as causing adeparture from the scope of the disclosure.

The methods, sequences or algorithms described in connection with theaspects disclosed herein may be embodied directly in hardware, in asoftware module executed by a processor, or in a combination of the two.A software module may reside in RAM memory, flash memory, ROM memory,EPROM memory, EEPROM memory, registers, hard disk, a removable disk, aCD-ROM, or any other form of storage medium known in the art. Anexemplary storage medium is coupled to the processor such that theprocessor can read information from, and write information to, thestorage medium. In the alternative, the storage medium may be integralto the processor.

In the foregoing specification, embodiments have been described withreference to specific examples thereof. It will, however, be evidentthat various modifications and changes may be made thereto withoutdeparting from the broader scope of the disclosure as set forth in theappended claims. The specification and drawings are, accordingly, to beregarded in an illustrative sense rather than a restrictive sense.

What is claimed is:
 1. A method performed by a relay controller,comprising: receiving a first motion trigger indicating that motion isdetected in an environment; obtaining one or more first images of theenvironment based on the first motion trigger; performing a first objectdetection operation that indicates whether the one or more first imagesinclude an object of interest; and selectively toggling a relay coupledto one or more devices associated with the environment based at least inpart on the first object detection operation, wherein the selectivetoggling of the relay includes: closing the relay responsive to thefirst object detection operation indicating that at least one of the oneor more first images includes an object of interest, wherein the closingof the relay couples the one or more devices to a power supply.
 2. Themethod of claim 1, wherein the obtaining of the one or more first imagescomprises: activating a camera responsive to receiving the first motiontrigger; and receiving the one or more first images from the camera. 3.The method of claim 1, wherein the selective toggling of the relayfurther includes: opening the relay responsive to the first objectdetection operation indicating that at least one of the one or morefirst images does not include an object of interest.
 4. The method ofclaim 3, wherein the opening of the relay decouples the one or moredevices from a power supply.
 5. The method of claim 1, furthercomprising: operating in a low power mode after a threshold durationfollowing the reception of the first motion trigger.
 6. The method ofclaim 5, wherein the one or more first images span the thresholdduration.
 7. The method of claim 5, further comprising: receiving asecond motion trigger indicating that motion is detected in theenvironment; waking up from the low power mode responsive to receivingthe second motion trigger; obtaining one or more second images of theenvironment responsive to waking from the low power mode; performing asecond object detection operation that indicates whether the one or moresecond images include an object of interest; and selectively togglingthe relay based at least in part on the second object detectionoperation.
 8. A relay controller comprising: a processing system; and amemory storing instructions that, when executed by the processingsystem, causes the relay controller to: receive a first motion triggerindicating that motion is detected in an environment; obtain one or morefirst images of the environment based on the first motion trigger;perform a first object detection operation that indicates whether theone or more first images include an object of interest; and selectivelytoggle a relay coupled to one or more devices associated with theenvironment based at least in part on the first object detectionoperation, wherein the selective toggling of the relay includes: closingthe relay responsive to the first object detection operation indicatingthat at least one of the one or more first images includes an object ofinterest, wherein the closing of the relay couples the one or moredevices to a power supply.
 9. The relay controller of claim 8, whereinthe selective toggling of the relay further includes: opening the relayresponsive to the first object detection operation indicating that atleast one of the one or more first images does not include an object ofinterest.
 10. The relay controller of claim 9, wherein the opening ofthe relay decouples the one or more devices from a power supply.
 11. Therelay controller of claim 8, wherein execution of the instructionsfurther causes the relay controller to: operate in a low power modeafter a threshold duration following the reception of the first motiontrigger.
 12. The relay controller of claim 11, wherein the one or morefirst images span the threshold duration.
 13. The relay controller ofclaim 11, wherein execution of the instructions further causes the relaycontroller to: receive a second motion trigger indicating that motion isdetected in the environment; wake up from the low power mode responsiveto receiving the second motion trigger; obtain one or more second imagesof the environment responsive to waking from the low power mode; performa second object detection operation that indicates whether the one ormore second images include an object of interest; and selectively togglethe relay based at least in part on the second object detectionoperation.
 14. A system comprising: a relay coupled to one or moredevices associated with an environment; a motion sensor configured todetect motion in the environment; a camera configured to capture imagesof the environment; and a relay controller configured to: receive, fromthe motion sensor, a motion trigger indicating that motion is detectedin the environment; obtain, via the camera, one or more images of theenvironment responsive to receiving the motion trigger; performing anobject detection operation that indicates whether the one or more imagesinclude an object of interest; and close the relay responsive to theobject detection operation indicating that at least one of the one ormore images includes an object of interest, wherein the closing of therelay couples the one or more devices to a power source.
 15. The systemof claim 14, wherein the one or more devices include one or morelighting elements configured to illuminate the environment.
 16. Thesystem of claim 14, wherein the relay controller is further configuredto: open the relay responsive to the object detection operationindicating that at least one of the one or more images does not includean object of interest, wherein the opening of the relay decouples theone or more devices from the power source.